An IDL object can wrapped for use in a Java application using the Export Bridge Assistant. For valuable information on the theory and architecture of a wrapper object created by the Export Bridge Assistant, see Using the Export Bridge Assistant.
This chapter provides several Java examples that incorporate the use of Java export objects. These include:
Note: You can quickly incorporate the processing power of IDL in a Java application by including the pre-built Java connector wrapper object in your external application. Use this option if you do not need custom methods or an interactive drawing surface. See Using the Connector Object for details and examples.
The general process for each of these examples involves the following:
Note: See Writing IDL Objects for Exporting for information on how to create custom IDL objects that can be successfully exported using the Export Bridge Assistant. There are important object method and data type requirements that must be met.
Note: When you distribute an application, you will also need to share:
– the executable (.class) file(s) including those generated by the Assistant
– the .pro or .sav file that contains the custom IDL object definition
Any .pro or .sav files included with your application must be located in the IDL path. Also, IDL_DIR/resource/bridges/export/java/javaidlb.jar must be in the Java classpath.
Examples in this chapter provide Windows-style compile javac (compile) and java (run) commands. If you are running on a platform other than Windows, use your platform’s path and directory separators and see Java Requirements for information about the bridge_setup file, which sets additional information.
It can be challenging to determine what is happening in the IDL process associated with a wrapper object without the debugging features of the IDL Workbench. For access to valuable debug information, consider using the IDL_BRIDGE_DEBUG environment variable, described in Debugging Java Wrapper Objects.